<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title><%= title %> - <%= desc %></title>

    <script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
    <script src="https://unpkg.com/axios@0.19.0/dist/axios.min.js"></script>
    <link rel="stylesheet" href="/css/reset.css">
  </head>
  <body>
    <div id="app">
      <div class="table">
        <div class="project-item"
          v-for="(item, index) in list"
          :key="index">
          <a :href="'/project/' + item.id">
            <span class="id">
              {{ item.id }}
            </span>
            <span class="title">
              {{ item.title }}
            </span>
            <span class="title">
              {{ item.createdTime }}
            </span>
            <span class="userNickname">
              {{ item.userNickname }}
            </span>
          </a>
        </div>
      </div>
    </div>
  </body>

  <script src="/js/query.js"></script>
  <script src="/js/api/project.js"></script>
  <script>
    const _app = new Vue({
      el: '#app',
      data: {
        list: [],
      },
      async mounted() {
        const data = await GetProjectList()
        this.list = data.filter(i => i.title)
      },
      methods: {
        submit() {
        }
      },
    })
  </script>
</html>